<template>
    {{count}}
    <button @click="add" c>+</button>
</template>

<script lang="ts">
    import { defineComponent, ref } from 'vue';

    export default defineComponent({
        setup() {
            const count = ref(2);

            const add = () => {
                count.value += 1;
            }

            return {
                count,
                add
            }
        }
    })
</script>



<style scope>
    
</style>